const {
    createProxyMiddleware: proxy
} = require("http-proxy-middleware");

module.exports = (app) => {
    app.use(
        "/api",
        proxy({
            // 此处的端口号要与后期数据请求的数据端一致
            // target: "http://180.76.99.14/",
            target: "http://121.89.205.189:3000/",
            changeOrigin: true,
        })
    );
    app.use(
        "/city",
        proxy({
            // 此处的端口号要与后期数据请求的数据端一致
            target: "http://121.89.205.189:3000/",
            // http://121.89.205.189:3000/

            changeOrigin: true,
        })
    );
};